<% cache do %>
	<h1>Feedback for the Future</h1>
	<p>
		<%= link_to image_tag('../images/silk/add.png', :class=>'icon') + " Add Feedback", new_feedback_url, :class=>'icon-link' %>
	</p>
	Let me know what you'd like to see in Expendite! You get one vote per feedback, and I'll give the highest rated feedback my priority when I'm pushing out new features.
<% end %>

<% cache(:action => "index", :action_suffix => "feedback_list") do %>
	<div id='feedback-display'>
	<% @feedbacks.each do |feedback| %>
		<div id='feedback-<%= feedback.id %>' class='feedback-single'>
		<% if feedback.done %><strike><% end %>
		<%= image_tag('../images/silk/bullet_black.png', :class=>'icon') %>
		<%= link_to h(feedback.title), feedback %> suggested by 
		<% if feedback.anonymous %><i>Anonymous</i><% else %><%=h feedback.user.name %><% end %> (Votes: <%=h feedback.rating %>) 
		<% if feedback.done %></strike><% end %>
		<span style="float:right;">
			<% if !feedback.done %>
				<% if !feedback.voted_on?(@user)%><%= link_to "Vote Up", :controller=>:feedbacks, :action=>:vote_up, :id=>feedback.id %><% end %>
				<% if @user.is_amber? %><%= link_to "Done", :controller=>:feedbacks, :action=>:mark_done, :id=>feedback.id %><% end %>
			<% end %>
		</span>
		</div>
	
	<% end %>
	</div>
<% end %>


